#include "System.h"

#include "Pet.h"

System::System()
{
}

System::~System()
{
}

void System::Init()
{
    m_screenWidth = m_screenHeight = 300;
    m_app.Create( sf::VideoMode( m_screenWidth, m_screenHeight ), "Pet" );
    m_imageManager.LoadAssets();
}

int System::Main()
{
    // Temp
    Pet pet;
    pet.Init(m_imageManager.GetImage("panda").image, m_screenWidth, m_screenHeight);

    // Temp bg color
    sf::Shape background = sf::Shape::Rectangle(0, 0, m_screenWidth, m_screenHeight,
                                                sf::Color(200,225,255,255));

    while ( m_app.IsOpened() )
    {
        m_app.Clear();
        m_app.Draw(background);
        m_app.Draw(pet.Sprite());
        m_app.Display();

        pet.Update();
    }

    return 0;
}

void System::Draw()
{
    m_app.Clear();

    m_app.Display();
}


